#ifndef __VAG_H__
#define __VAG_H__

#include "includes.h"
#include "vehicle.h"
#include "drivers.h"

typedef struct {
    uint8_t id;
    uint8_t pid;
    uint8_t offset;
    uint8_t size;
    uint8_t support;
} VagEngPidMap;

typedef struct {
    uint8_t id;
    uint8_t cmd[2];
    uint8_t offset;
    uint8_t size;
    uint8_t support;
} VagBcmPidMap;

void vag_init(Vehicle *vehicle);
void vag_initialize(void);

uint8_t vag_check_engine_on(void);
void vag_process_vin_code(VinCode *code);
void vag_process_eng_data(EngineDataMap *dataMap);
void vag_process_bcm_data(BcmDataMap *dataMap);
void vag_process_ipc_data(IpcDataMap *dataMap);
void vag_keepalive(void);
void vag_start_timer(uint16_t timeout);
void vag_stop_timer(void);
void vag_keepalive_timer_callback(void *p_arg);

#endif
